package com.ruoyi.dora.portal.service.impl;


import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.dora.portal.entity.SysConfig;
import com.ruoyi.dora.portal.mapper.SysConfigMapper;
import com.ruoyi.dora.portal.service.ISysConfigService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 参数配置表 服务实现类
 * </p>
 *
 * @author Rubble
 * @since 2021-07-20
 */
@Service
public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig> implements ISysConfigService {

  @Override
  public SysConfig selectConfigByKey (String key) {
    SysConfig config = this.getOne(Wrappers.<SysConfig>lambdaQuery()
        .eq(SysConfig::getConfigKey, key), false);
    return config;
  }
}
